import request from '@/utils/request'

// 查询供应商档案列表
export function listVendors(query) {
  return request({
    url: '/system/vendors/list',
    method: 'get',
    params: query
  })
}

// 查询供应商档案详细
export function getVendors(vendorId) {
  return request({
    url: '/system/vendors/' + vendorId,
    method: 'get'
  })
}

// 新增供应商档案
export function addVendors(data) {
  return request({
    url: '/system/vendors',
    method: 'post',
    data: data
  })
}

// 修改供应商档案
export function updateVendors(data) {
  return request({
    url: '/system/vendors',
    method: 'put',
    data: data
  })
}

// 删除供应商档案
export function delVendors(vendorId) {
  return request({
    url: '/system/vendors/' + vendorId,
    method: 'delete'
  })
}
